<?php

/***********************************************************
 * Define all your database interactions here
 ***********************************************************/
class Table extends rokko\RokkoModel {
   
   /***********************************************************
    * A sample function to demonstrate how to access your database.
    * Since the database layer is abstracted through WordPress' native WPDB object, but sure you're familiar with it first.
    ***********************************************************/
   public function getTableNames(){
      
      $q = $this->wpdb->get_results("
            SHOW TABLES
      ");
      
      $tables = array();
      foreach ($q as $t)
         foreach ($t as $k => $v)
            array_push($tables, array("name" => $v));
      
      return $tables;
   }
}